<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
<!--
Copyright 2008 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
  <title>Quadtree Projections onto the Earth</title>
  <link rel=stylesheet href='projections.css' type='text/css' />
  <!-- *** Replace the key below below with your own API key, available at http://code.google.com/apis/maps/signup.html *** -->
  <script src="http://www.google.com/jsapi?key=ABQIAAAAwbkbZLyhsmTCWXbTcjbgbRSzHs7K5SvaUdm8ua-Xxy_-2dYwMxQMhnagaawTo7L1FE1-amhuQxIlXw"></script>
  <script type="text/javascript" src="../../lib/projections.js"></script>
  <script type="text/javascript">
google.load("earth", "1");

var ge = null;

function init() {
  init3D();
}

function initCB(object) {
  ge = object;
  ge.getWindow().setVisibility(true);
}

function failureCB(object) {
  /***
   * This function will be called if plugin fails to load, in case
   * you need to handle that error condition.
   ***/
}

function init3D() {
  google.earth.createInstance("map3d", initCB, failureCB);
}

  </script>
</head>
<body onload='init()'>
  <div class="title">
    Quadtree Projections onto the Earth
  </div>
  
  <div id='map3d'></div>

  <div>
    <input type=button class="button wide" onclick="drawPlateCarree();" value="Plate-Carree">
    <input type=button class="button wide" onclick="drawMercator();" value="Mercator">
    <input type=button class="button wide" onclick="drawBentMercator();" value="Bent Mercator">
    <input type=button class="button wide" onclick="drawCubeCell();" value="Cube Cell">
  
    Node count: <span id="node_ct"></span>
  
    <p>Press one of the buttons to recompute a simulated LOD subdivision
    using that projection.</p>
  
    <p>Note:
      <ul>
  
        <li>LOD is strictly 2D, based on the camera look-at
        position at the time you press the button.</li>
        
        <li>"Bent Mercator" is Mercator, except that latitude [-90,90]
        is mapped into [-85,85] for the projection math, and therefore
        it covers the poles (but is not conformal, unlike regular
        Mercator).</li>
  
        <li>Cube Cell's LOD calculation is approximate, and different from
        the others, so the node counts aren't directly comparable.</li>
      </ul>
    </p>
  </div>
</body>
</html>
